﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Mvc.Filters;
using MJTop.Model;
using MJTop.Web.Core.Filters;
using MJTop.Model.SYS;

namespace MJTop.Web.Core
{
    [FileFilter]
    [AuthorityFilter]
    public class BaseController : Controller
    {
        /// <summary>
        /// 当前用户 
        /// </summary>
        public const string CONST_SESSION_USER = "CURRENTUSER";

        
        /// <summary>
        /// 登陆用户名，用于 记住登陆账号 功能使用 
        /// </summary>
        public const string CONST_COOKIE_UNAME = "SYSLOGINNAME";


        /// <summary>
        /// 当前登陆用户
        /// </summary>
        public SYS_USER CurrentUser
        {
            get
            {
                return Session[CONST_SESSION_USER] as SYS_USER;
            }
        }

    }
}

